package com.nut.sp.dao.impl;


import com.nut.sp.dao.UserDao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository
public class UserDaoImpl implements UserDao {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Override
    public void updateUserName() {
        String sql = "update user set name = 'test' where id = 1";
        jdbcTemplate.execute(sql);
    }

    @Override
    public void updateCreatedTime() {
        String sql = "update user set create_time = now() where id = 2";
        jdbcTemplate.execute(sql);
    }
}
